import request from '/@/utils/request';

// 查询拼团产品列表
export function listCombination(query?: Object) {
  return request({
    url: '/module/product/combination/list',
    method: 'get',
    params: query
  })
}

// 查询拼团产品详细
export function getCombination(id?: number) {
  return request({
    url: '/module/product/combination/' + id,
    method: 'get'
  })
}

// 新增拼团产品
export function addCombination(data?: Object) {
  return request({
    url: '/module/product/combination',
    method: 'post',
    data: data
  })
}

// 修改拼团产品
export function updateCombination(data?: Object) {
  return request({
    url: '/module/product/combination',
    method: 'put',
    data: data
  })
}

// 删除拼团产品
export function delCombination(id?: number) {
  return request({
    url: '/module/product/combination/' + id,
    method: 'delete'
  })
}

// 导出拼团产品
export function exportCombination(query?: Object) {
  return request({
    url: '/module/product/combination/export',
    method: 'get',
    params: query
  })
}
